<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimpleWindow: sw::CanvasLayout类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SimpleWindow
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classsw_1_1_canvas_layout.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classsw_1_1_canvas_layout-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">sw::CanvasLayout类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>绝对位置布局方式  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_canvas_layout_8h_source.html">CanvasLayout.h</a>&gt;</code></p>
<div class="dynheader">
类 sw::CanvasLayout 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsw_1_1_canvas_layout.png" usemap="#sw::CanvasLayout_map" alt=""/>
  <map id="sw::CanvasLayout_map" name="sw::CanvasLayout_map">
<area href="classsw_1_1_layout_host.html" title="用于托管元素的布局方式的对象类型，是所有布局方式类型的基类" alt="sw::LayoutHost" shape="rect" coords="0,56,114,80"/>
<area href="classsw_1_1_i_layout.html" title="布局接口" alt="sw::ILayout" shape="rect" coords="0,0,114,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a8e0f36dd4b70eda9db6c2665b019a4e5" id="r_a8e0f36dd4b70eda9db6c2665b019a4e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8e0f36dd4b70eda9db6c2665b019a4e5">MeasureOverride</a> (<a class="el" href="structsw_1_1_size.html">Size</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">availableSize</a>) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a8e0f36dd4b70eda9db6c2665b019a4e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算所需尺寸  <br /></td></tr>
<tr class="separator:a8e0f36dd4b70eda9db6c2665b019a4e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae537365bb8c5ab18ec497844d87f288d" id="r_ae537365bb8c5ab18ec497844d87f288d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae537365bb8c5ab18ec497844d87f288d">ArrangeOverride</a> (<a class="el" href="structsw_1_1_size.html">Size</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">finalSize</a>) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:ae537365bb8c5ab18ec497844d87f288d"><td class="mdescLeft">&#160;</td><td class="mdescRight">安排控件  <br /></td></tr>
<tr class="separator:ae537365bb8c5ab18ec497844d87f288d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classsw_1_1_layout_host"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classsw_1_1_layout_host')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classsw_1_1_layout_host.html">sw::LayoutHost</a></td></tr>
<tr class="memitem:ace58d1aefa8427892f71bfa8b91e9281 inherit pub_methods_classsw_1_1_layout_host" id="r_ace58d1aefa8427892f71bfa8b91e9281"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#ace58d1aefa8427892f71bfa8b91e9281">Associate</a> (<a class="el" href="classsw_1_1_i_layout.html">ILayout</a> *<a class="el" href="classsw_1_1_dictionary.html">obj</a>)</td></tr>
<tr class="memdesc:ace58d1aefa8427892f71bfa8b91e9281 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置关联的对象，每个LayoutHost只能关联一个对象  <br /></td></tr>
<tr class="separator:ace58d1aefa8427892f71bfa8b91e9281 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab89962ec32dec364e4e18ea0afe44d52 inherit pub_methods_classsw_1_1_layout_host" id="r_ab89962ec32dec364e4e18ea0afe44d52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">uint64_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#ab89962ec32dec364e4e18ea0afe44d52">GetLayoutTag</a> () <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:ab89962ec32dec364e4e18ea0afe44d52 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取布局标记  <br /></td></tr>
<tr class="separator:ab89962ec32dec364e4e18ea0afe44d52 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c6c9750b12c5816608d78d72225b872 inherit pub_methods_classsw_1_1_layout_host" id="r_a0c6c9750b12c5816608d78d72225b872"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">int</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#a0c6c9750b12c5816608d78d72225b872">GetChildLayoutCount</a> () <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a0c6c9750b12c5816608d78d72225b872 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取关联对象子控件的数量  <br /></td></tr>
<tr class="separator:a0c6c9750b12c5816608d78d72225b872 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd04747a5d0395d5f95f06185e28b964 inherit pub_methods_classsw_1_1_layout_host" id="r_abd04747a5d0395d5f95f06185e28b964"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_i_layout.html">ILayout</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#abd04747a5d0395d5f95f06185e28b964">GetChildLayoutAt</a> (<a class="el" href="classsw_1_1_dictionary.html">int</a> index) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:abd04747a5d0395d5f95f06185e28b964 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取关联对象对应索引处的子控件  <br /></td></tr>
<tr class="separator:abd04747a5d0395d5f95f06185e28b964 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7099b15d8916a42f58de10d0266e89f6 inherit pub_methods_classsw_1_1_layout_host" id="r_a7099b15d8916a42f58de10d0266e89f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="structsw_1_1_size.html">Size</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#a7099b15d8916a42f58de10d0266e89f6">GetDesireSize</a> () <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a7099b15d8916a42f58de10d0266e89f6 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取关联对象所需尺寸  <br /></td></tr>
<tr class="separator:a7099b15d8916a42f58de10d0266e89f6 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a035aefcab7040b1ac1503e4f25501e48 inherit pub_methods_classsw_1_1_layout_host" id="r_a035aefcab7040b1ac1503e4f25501e48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#a035aefcab7040b1ac1503e4f25501e48">SetDesireSize</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="structsw_1_1_size.html">Size</a> &amp;size) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a035aefcab7040b1ac1503e4f25501e48 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置关联对象所需的尺寸  <br /></td></tr>
<tr class="separator:a035aefcab7040b1ac1503e4f25501e48 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa520181822f89994362a010237687b3f inherit pub_methods_classsw_1_1_layout_host" id="r_aa520181822f89994362a010237687b3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#aa520181822f89994362a010237687b3f">Measure</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="structsw_1_1_size.html">Size</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">availableSize</a>) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:aa520181822f89994362a010237687b3f inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">测量控件所需尺寸  <br /></td></tr>
<tr class="separator:aa520181822f89994362a010237687b3f inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52f5e12df00e032fd424db409fd73951 inherit pub_methods_classsw_1_1_layout_host" id="r_a52f5e12df00e032fd424db409fd73951"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_layout_host.html#a52f5e12df00e032fd424db409fd73951">Arrange</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="structsw_1_1_rect.html">Rect</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">finalPosition</a>) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a52f5e12df00e032fd424db409fd73951 inherit pub_methods_classsw_1_1_layout_host"><td class="mdescLeft">&#160;</td><td class="mdescRight">安排控件位置  <br /></td></tr>
<tr class="separator:a52f5e12df00e032fd424db409fd73951 inherit pub_methods_classsw_1_1_layout_host"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>绝对位置布局方式 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="ae537365bb8c5ab18ec497844d87f288d" name="ae537365bb8c5ab18ec497844d87f288d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae537365bb8c5ab18ec497844d87f288d">&#9670;&#160;</a></span>ArrangeOverride()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a> sw::CanvasLayout::ArrangeOverride </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsw_1_1_size.html">Size</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>finalSize</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>安排控件 </p>

<p>实现了 <a class="el" href="classsw_1_1_layout_host.html#ac28cdcd081c105a2acedfddce436897d">sw::LayoutHost</a>.</p>

</div>
</div>
<a id="a8e0f36dd4b70eda9db6c2665b019a4e5" name="a8e0f36dd4b70eda9db6c2665b019a4e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e0f36dd4b70eda9db6c2665b019a4e5">&#9670;&#160;</a></span>MeasureOverride()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">void</a> sw::CanvasLayout::MeasureOverride </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsw_1_1_size.html">Size</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>availableSize</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>计算所需尺寸 </p>

<p>实现了 <a class="el" href="classsw_1_1_layout_host.html#a4206d0a20d92581d33a4510fb2ba1871">sw::LayoutHost</a>.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="_canvas_layout_8h_source.html">CanvasLayout.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>sw</b></li><li class="navelem"><a class="el" href="classsw_1_1_canvas_layout.html">CanvasLayout</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
